/*
* 
* @license	Apache License 2.0
* @author	Eugene Kuznetsov
*
*/
#include "CDeviceServer.hpp"
#include "CTargetServer.hpp"
#include "CDataBuffer.hpp"
#include "CDoubleBufferQueue.hpp"
#include "CErrorHandler.hpp"
#include <iostream>
#include <winsock2.h>

int main(int argc, char * argv[])
{
	WSADATA wd;
	WSAStartup(MAKEWORD(2,2), &wd);
	/*CDoubleBufferQueue q;
	CErrorHandler e;
	CTargetServer::RunTargetServer("81.25.231.174", 50003, &q, &e);

	CDataBuffer buffer;
	while (q.getState() == Base::STATE_OK)
	{
		Sleep(100);
	}
	if (q.getReceiveQueueSize() > 0)
	{
		buffer.clear();
		q.PopFromReceiveQueue(buffer);
		printf("\n=== DATA ===\n%s\n=== EOF DATA ===\n", buffer.data());
	}*/

	CDeviceServer::RunDeviceServer(5000);

	int a;
	std::cin>>a;
	return 0;
}
